package com.prp.gwt.client.vo;

import com.google.gwt.user.client.rpc.IsSerializable;

public class User implements IsSerializable {
	
	private String username = null;
	private String email = null;
	private int id = -1;
	private int age;
	private boolean gender;
	private String realname;
	private String portrait;
	private int identity;
	private boolean isCore = false;
	private boolean isNeighbour = false;
	private User recommender = null;
	private String blog;
	private String introduction;
	private String address;
	private int recommendId;
	
	public int getRecommendId() {
		return recommendId;
	}

	public void setRecommendId(int recommendId) {
		this.recommendId = recommendId;
	}

	public User getRecommender() {
		return recommender;
	}

	public void setRecommender(User recommender) {
		this.recommender = recommender;
	}

	public boolean isNeighbour() {
		return isNeighbour;
	}

	public void setNeighbour(boolean isNeighbour) {
		this.isNeighbour = isNeighbour;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public boolean getGender() {
		return gender;
	}

	public void setGender(boolean gender) {
		this.gender = gender;
	}

	public String getRealname() {
		return realname;
	}

	public void setRealname(String realname) {
		this.realname = realname;
	}

	public int getIdentity() {
		return identity;
	}

	public String getBlog() {
		return blog;
	}

	public void setBlog(String blog) {
		this.blog = blog;
	}

	public String getIntroduction() {
		return introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public void setIdentity(int identity) {
		this.identity = identity;
	}

	public String getPortrait() {
		return portrait;
	}

	public void setPortrait(String portrait) {
		this.portrait = portrait;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public boolean isCore() {
		return isCore;
	}

	public void setCore(boolean isCore) {
		this.isCore = isCore;
	}

	public User clone(){
		User user = new User();
		user.username = username;
		user.email = email;
		user.id = id;
		user.age = age;
		user.gender = gender;
		user.realname = realname;
		user.portrait = portrait;
		user.identity = identity;
		user.isCore = isCore;
		user.isNeighbour = isNeighbour;
		user.recommender = recommender;
		return user;
	}

	@Override
	public boolean equals(Object obj) {
		if(obj instanceof User)
			return ((User) obj).getId() == id;
		return false;
	}
	
}
